import request from "@/utils/request.js";
// 下单
export const createOrder = (orderData) => {
  return request.post('/order/addOrder', orderData)
}
// 支付订单
export const payOrder = (orderNo) => {
  return request.post('/order/pay', {
    orderNo
  })
}
// 获取订单核销二维码
export const getOrderVerificationCode = (orderNo) => {
  return request.get('/order/generateQRCode', {
    orderNo
  }, {
    showLoading: false
  })
}
// 获取订单详情
export const getOrderDetails = (orderNo) => {
  return request.get('/order/getOrderDetails', {
    orderNo
  })
}
// 获取订单列表
export const getOrderList = (params) => {
  return request.get('/order/getOrderPage', params)
}
// 取消订单
export const cancelOrder = (orderNo) => {
  return request.post('/order/cancelOrder', {
    orderNo
  })
}